/**
 * @(#)BaseInfoDAOImpl.java 2016年12月5日
 * Copyright(C) 2015 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.dao.impl;


import java.util.List;
import java.util.Map;

import org.jsbd.boss.dao.IBaseInfoDAO;
import org.jsbd.boss.domian.BaseInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import edu.hziee.common.dbroute.BaseDAO;

/**
 * TODO 请加入本类的说明
 *
 * @author <a href="mailto:zhangbinghua@zhexinit.com" >zbh</a>
 * @version 1.0.0
 */
public class BaseInfoDAOImpl extends BaseDAO implements IBaseInfoDAO {
    public static final Logger LOGGER = LoggerFactory.getLogger(BaseInfoDAOImpl.class);

    @Override
    public List<BaseInfo> getAllChannelInfo() {
        return super.queryForList("qy_channel_baseinfo.GET_ALL_CONFIG");
    }

    @Override
    public List<BaseInfo> selectConfigList(BaseInfo baseInfo) {
        return super.queryForList("qy_channel_baseinfo.SELECT_CONFIG_LIST", baseInfo);
    }

    @Override
    public Integer insertConfig(BaseInfo baseInfo) {
        return (Integer) super.insert("qy_channel_baseinfo.INSERT_CONFIG", baseInfo);
    }

    @Override
    public Integer deleteConfig(String id) {
        return super.delete("qy_channel_baseinfo.DELETE_CONFIG", id);
    }

    @Override
    public Map<Integer, String> getAllChannelInfoMap() {
        return (Map<Integer, String>) super.queryForObject("qy_channel_baseinfo.GET_ALL_CHANNEL_INFO_MAP");
    }

    @Override
    public BaseInfo getBaseInfoById(Integer id) {
        return (BaseInfo) super.queryForObject("qy_channel_baseinfo.SELECT_BASE_INFO_BY_ID", id);
    }

    @Override
    public Integer selectCount(BaseInfo baseInfo) {
        return super.queryForCount("qy_channel_baseinfo.SELECT_COUNT_CONFIG", baseInfo);
    }

    @Override
    public Integer updateConfig(BaseInfo baseInfo) {
        return super.update("qy_channel_baseinfo.UPDATE_CONFIG", baseInfo);
    }
}
